package com.yuzhi.master.conBjMx.mapper;

import com.yuzhi.common.core.domain.ApiResult;
import com.yuzhi.common.core.mapper.BaseMapperPlus;
import com.yuzhi.master.conBjMx.domain.ConBjMx;
import com.yuzhi.master.conBjMx.domain.vo.ConBjMxVo;
import com.yuzhi.master.conBjMx.domain.vo.AlarmStatisticsVo;
import com.yuzhi.master.conBjMx.domain.vo.AlarmTrendVo;
import com.yuzhi.master.conBjMx.domain.vo.AlarmEventListVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 报警异常明细表Mapper接口
 *
 * @author auto code generator
 * @date 2025-07-17
 */
public interface ConBjMxMapper extends BaseMapperPlus<ConBjMxMapper, ConBjMx, ConBjMxVo> {

    List<ConBjMx> selectPageList(@Param("page") Page<ConBjMxVo> page, @Param(Constants.WRAPPER) Wrapper<ConBjMx> queryWrapper);

    List<ConBjMxVo> selectTodayRecordsByKeyType(Integer keyType);

    Map<String, Integer> getTodayStatistics();

    List<String> getAlarmDeviceStats();

    /**
     * 获取报警统计信息（四个统计卡片数据）
     * @param conditions 查询条件
     * @return 统计信息
     */
    AlarmStatisticsVo getAlarmStatistics(@Param("conditions") Map<String, Object> conditions);

    /**
     * 获取报警趋势数据（近7天趋势图表）
     * @param conditions 查询条件
     * @return 趋势数据
     */
    List<AlarmTrendVo.AlarmTrendDataVo> getAlarmTrend(@Param("conditions") Map<String, Object> conditions);

    /**
     * 获取报警事件列表
     * @param conditions 查询条件
     * @return 事件列表
     */
    List<AlarmEventListVo.AlarmEventVo> getAlarmEventList(@Param("conditions") Map<String, Object> conditions);

    /**
     * 获取报警事件列表总数
     * @param conditions 查询条件
     * @return 总数
     */
    Long getAlarmEventListCount(@Param("conditions") Map<String, Object> conditions);
}
